package MyError

import (
	"fmt"
	"strings"
)

func NewSchedulerError(errtype ErrorType, errMsg string) IllegalParameterError {
	return IllegalParameterError{
		msg: fmt.Sprintf("%s: %s", errtype, strings.TrimSpace(errMsg)),
	}
}

func NewCrawlerErrorError(errtype ErrorType, errMsg string) IllegalParameterError {
	return IllegalParameterError{
		msg: fmt.Sprintf("%s: %s", errtype, strings.TrimSpace(errMsg)),
	}
}
